package com.gzu.emr.service.impl;

import com.gzu.emr.dto.Doctor;
import com.gzu.emr.mapper.DoctorMapper;
import com.gzu.emr.service.DoctorService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class DoctorServiceImpl implements DoctorService {

    @Resource
    private DoctorMapper doctorMapper;

    @Override
    public boolean checkDoctorAuthority(Integer id, String password) {
        String dbPassword = doctorMapper.selectPasswordById(id);

        if(!password.equals(dbPassword)) {
            //todo exception
            return false;
        }
        return true;
    }
}
